how to predict states of matter